import request from '@/util/request';

export const sayHello = () => {
  return request({
    url: '/test/hello',
    method: 'get',
  });
};

export const getUser = (params: any) => {
  return request({
    url: '/test/obj',
    method: 'get',
    params,
  });
};

export const insert = (data: any) => {
  return request({
    url: '/test/insert',
    method: 'post',
    data,
  });
};

export const update = () => {
  return request({
    url: '/test/update',
    method: 'put',
  });
};

export const deleted = () => {
  return request({
    url: '/test/delete',
    method: 'delete',
  });
};

export const err = () => {
  return request({
    url: '/test/err',
    method: 'get',
  });
};
